package com.mm.plugin.logging.enums;

/**
 * API 统一返回状态码
 */
public enum ResultCodeEnum {

    SUCCESS(200,"成功"),

    FAIL(-1,"失败"),
    /**
     * 系统异常 500 服务器的内部错误
     */
    SERVER_ERROR(500, "服务器开小差，请稍后再试"),

    /**
     * 系统限流
     */
    TRAFFIC_LIMITING(429, "哎呀，网络拥挤请稍后再试试"),
    /**
     * 权限异常
     */
    NOT_PERMISSIONS(401,"您没有操作权限"),
    BODY_NOT_MATCH(400,"请求的数据格式不符!"),
    NOT_FOUND(404, "未找到该资源!"),
    SERVER_BUSY(503,"服务器正忙，请稍后再试!"),
    SYSTREM_ERROR(9000, "系统错误"),
    VALIDATE_ERROR(9001, "参数验证失败"),
    FIELD_INVALID(9002, "登录失败"),
//    SAVE_ERROR(9003, "数据添加失败"),
    NOT_LOGIN(9004, "用户未登录"),
    JWT_TOKEN_EXPIRED(9005, "登录过期"),
    JWT_TOKEN_SIGNATURE_ERROR(9006, "签名错误"),
    JWT_TOKEN_ERROR(9007, "登录错误，请重新登录"),
    NO_MORE_DATA(9008, "没有更多数据了"),
    NO_MEMBER(9009, "用户不存在，请重新登录"),
    DATA_EXIST(9010, "数据已存在"),
    NO_FILE(10000,"请上传文件"),
    NO_TOKEN(10001,"请登录"),
    SAVE_ERROR(10002,"保存失败"),
    EDIT_ERROR(10003,"编辑失败"),
    DELETE_ERROR(10004,"删除失败"),
    NO_DATA(9011, "数据不存在!"),



    PARAMDATA_IS_NULL(-5001,"参数为空"),
    DOWNLOAD_PATH_NULL(-5002,"文件下载地址为空"),
    DOWNLOAD_FILE_NOT_EXISTS(-5003,"文件不存在"),

    //首页
    INDEX_AREA_NULL(-6001,"所属区域为空"),
    HOSPITAL_ID_NULL(-6002,"医院ID为空，查询失败，请刷新重试"),
    DOCHECK_NOEXISTS(-6003,"检查不存在或者已经删除"),
    DOCHECK_UNMEDICINE(-6004,"该检查的检查项目不需要用药"),
    DOCHECK_YETMEDICINE(-6005,"该检查的检查项目已在用药中或者已经结束"),
    MYDRIASIS_NULL(-6006,"是否散瞳不能为空，请选择"),
    DOCHECK_ID_NULL(-6007,"检查Id为空,请刷新重试"),
    CHECKITEM_ID_NULL(-6008,"项目ID为空请传入"),
    ROOMID_NULL(-6009,"检查室ID为空"),
    QUEUESORT_NULL(-6010,"排序为空"),
    ITEMSUEE_MYDRIASIS(-6011,"项目设置了必须散瞳，不能更改"),
    ITEM_EXCEPTION(-6012,"检查绑定的项目不存在或者数据有误"),
    SCREENIP_NULL(-6013,"大屏IP为空"),
    WAIT_SCREEN_NULL(-6014,"大屏不存在或者已经删除"),
    ;


    private Integer code;

    private String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode(){
        return this.code;
    }

    public String getMessage(){
        return this.message;
    }
}
